<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>会员登录 - ${site.name} - Powered by JavaCMS</title>
<script src="${resSys}/jquery.js" type="text/javascript"></script>
<script src="${resSys}/front.js" type="text/javascript"></script>

<link type="text/css" rel="stylesheet" href="/${res}/css/index.css" />

<!--[if lt IE 9]> 
<script src="/${res}/js/html5shiv.min.js"></script>
<script src="/${res}/js/respond.min.js"></script>
<![endif]-->

<script type="text/javascript">
$(function() {
	$("#jvForm").validate();
});
</script>

</head>

<body style="background-color:#f7f7f7;">
[#include "../include/top.html"/]
[#include "../include/header.html"/] 
<div class="register-box login-box">   
   [#if loginSource??]
        <div class="login-source">
   	[#if loginSource=="needPerm"]
   	 该文章需要会员登录后才能浏览！
   	[#elseif loginSource=="charge"]
   	 该文章是收费文章，需要会员登录付费后才能浏览！
   	[/#if]
         </div>
   [/#if] 
  <div class="register-nav"><span>会员登录</span><div class="register-login">没有账号，<a class="tc" href="${base}/register.jspx">立即注册 ></a></div></div> 
  <form id="jvForm" action="${base}/login.jspx" method="post">
      <div class="inf-message">
      [#if message??]
            
				[#if message=="true"]
				您必须登录后才能继续刚才的操作
				[#else]
				${message}
				[/#if]
				<input type="hidden" name="message" value="${message}"/>
                   
				[/#if]	
                  		
				[#if processUrl??]<input type="hidden" name="processUrl" value="${processUrl}"/>[/#if]
				[#if returnUrl??]<input type="hidden" name="returnUrl" value="${returnUrl!}"/>[#else]<input type="hidden" name="returnUrl" value="/"/>[/#if]
				[#if error??]
				<div class="error-message">
						[#if error=="org.apache.shiro.authc.IncorrectCredentialsException"]
						[@s.m "error.invalidPassword"/]
						[#elseif error=="org.apache.shiro.authc.UnknownAccountException"]
						[@s.m "error.usernameNotExist"/]
						[#elseif error=="com.jeecms.common.security.CaptchaErrorException"]
						[@s.m "error.invalidCaptcha"/]
						[#elseif error=="com.jeecms.common.security.DisabledException"]
						[@s.m "error.userDisabled"/]
						[#elseif error=="com.jeecms.common.security.InactiveException"]
						[@s.m "error.userInActive"/]
 						[/#if]
				</div>	
				[/#if]
				[#if success??]
				[#if success]
					注册成功！
				[/#if]
    
      [/#if]
  </div>
      <div class="username-con"><i></i><input id="username" name="username" class="required login-input" type="text" placeholder="用户名"></div>
      <div class="password-con"><i></i><input id="password" name="password" class="required password-input" type="password" placeholder="密码"></div>
      [#if (errorTimes??&&errorTimes<=0)||(errorRemaining?? && errorRemaining<=0)]
      <div class="captcha-con clearfix"><i></i><input type="text" id="captcha" name="captcha" class=""required captcha-input" placeholder="验证码"/><img src="${base}/captcha.svl" onclick="this.src='${base}/captcha.svl?d='+new Date()*1" /></div>
      [/#if]
    <div class="login-rem clearfix">
      <div class="next-day"><input type="checkbox" class="login-checkbox"  value="true" name="rememberMe">下次自动登录</div>
      <a href="${base}/member/forgot_password.jspx">忘记密码</a>
    </div>
    <input type="hidden" name="token"  value="${token!}" />
    <input type="submit" class="login-btn" value="登 录">
  <div class="quick">
    <p>一键登录</p>
    <div class="quick-list clearfix">
      
      <a class="quick-qq" id="qqLoginBtn" title="用QQ账号登录"></a>
      <script type="text/javascript" src="http://qzonestyle.gtimg.cn/qzone/openapi/qc_loader.js" data-appid="${site.config.qqID!}" data-redirecturi="http://${site.domain}/public_auth.jspx" charset="utf-8"></script>
					<script type="text/javascript">
						//插入按钮的节点qqLoginBtn id
					    QC.Login({btnId:"qqLoginBtn",size: "A_M"}, function(reqData, opts){//登录成功
					       //根据返回数据，更换按钮显示状态方法
					       var dom = document.getElementById(opts['btnId']),
					       _logoutTemplate=[
					            //头像
					         //   '<span><img src="{figureurl}" class="{size_key}"/></span>',
					            //昵称
					            '<span>{nickname}</span>',
					            //退出
					            '<span><a href="javascript:QC.Login.signOut();">退出</a></span>'    
					       ].join("");
					       dom && (dom.innerHTML = QC.String.format(_logoutTemplate, {
					           nickname : QC.String.escHTML(reqData.nickname), //做xss过滤
					           figureurl : reqData.figureurl
					       }));
					       var userId=null;
                           [#if user??]
                           userId="${user.id}";
                           [/#if]
                           if(QC.Login.check()&&userId==null){
                                     QC.Login.signOut();          
                           }
					   });
					 </script>
     
      <a class="quick-tx" id="qqwebo_login_btn" title="用腾讯微博账号登录"></a>
      <script type="text/javascript" src="http://mat1.gtimg.com/app/openjs/openjs.js"></script>
                    	<script type="text/javascript">
                    		T.init({
                    		    appkey: ${site.config.qqWeboID!}, 
                    		    autoclose:false,
                    		    callbackurl:"http://${site.domain}/public_auth.jspx"
                    		});
                    		 function logout(){
                                 T.logout(function (loginStatus) { // 登出用户
			    					// 登录成功
								});
                			}
                    		$(function() {
                        		$("#qqwebo_login_btn").click(function(){
                        			T.login(function (loginStatus) { // 弹出登录窗口
       							     // 本次登录成功
       							       $.cookie("qqWeboId",loginStatus.openid);
       							 	},function (error) {
       							 	});
                            	});
                    		});
						</script>
	
      
      <a class="quick-sina" id="wb_connect_btn" title="用新浪微博账号登录"></a>
      <script src="http://tjs.sjs.sinajs.cn/open/api/js/wb.js?appkey=${site.config.sinaID!}" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
		 WB2.anyWhere(function(W){
		 W.widget.connectButton({
		  id: "wb_connect_btn",
		  type: '3,2',
		  callback : {
		   login:function(o){
		    //登录成功之后执行
		    location="${base}/public_auth.jspx";
		   },
		   logout:function(){
		    //退出之后执行退出本地用户
	 		location="${base}/logout.jspx?returnUrl=/";
		   }
		  }
		 });
		});
		</script>
	<a href="${base}/weixin_login.jspx" class="quick-weixin" title="微信账号登录" ></a>
    </div>
  </div>
  </form>
  </div>
[#include "../include/footer.html"/]
[#include "../include/right-fixed.html"/]
</body>
</html>